added compile file and refactored the code for entering a system