adding in callback support and tests