fix & simplize callback func