Adding some functions, still testing