add shorter implementation (refactoring?)