making script less error prone