Wrote 4 of 6 functions