update to version 0.7
arranged code