add main script
precise a bit