further simplified implementation