refactored according to sparse use cases