optimize code + change method name