Added in 3 new functions, will need more testing though.