modify proj1 for advanced function