cleaned up the code + completed second challenge