added funcitons + test