commented my code a bit