abstracted functionality to be reuseable