more changes to scrypt and correct valid