implemented all methods. need to write check_pathnamelen