improved documentation and reusability