update method name and use better logic