Added new functions. Still need to fix