some code refines