Added 2 solutions. Updated functions