stuffs from others, really a mess, need refactor