added function for reuseability