updated error checking and fixed error with seed specificatoin for SCA