improve callback and stuff