BUGGED VERSION FROM MAIN ANS STUDENT