fixed typo, moved compilation to seperate file