getting rid of duplicated code