Finished implementing basic functions