added step by step notes and cleaned up code