implemented methods in sorted file