renaming pextend to extend_prototype, so it will be more readable