added some beginning compile code (definitely should be changed later as its messy)