do some modification to make it run smoothly