add resource callback handler