changed private method to public method