updated scratch implementations