changed method name and function