First working version of select callback functions with given data.