First 2 functions done.