Retakes logic implemented (commit bugfix =( )