reduce even more code duplication