more improvements with testing in mind