put it into post function