add checks to script