Added specs for all the functions, updated parameters