shorten 2 functions up a bit