removed duplicate code, and alias_method used