refactor method to be in similar style as other method