improve callback arguments and scope