callback function for eval command