now using dynamic types in callbacks