combine two methods that are basically the same