cleaning up the selected class code