created an ordered list and cleaned up the code