complete refactoring of asana script using callbacks