could this one also take src and callback and be moved out of the function, aka not defined every time?