adjective beforehand can also be used as an adjective to describe something done in advance
adverb beforehand is an adverb that means in advance or earlier