forgot some 'end' statements to finish out if blocks, syntax FTW