reorganize myfunction