removing dupe code