slightly cleaner code, only slightly