commented code and seperated test into own file