refactor double to use callbacks