Added logic, fixed answer