some code style and change to interval