testable and unclean version