removing boilerplate code