less code duplication