done, fixed functions