added utils code