scratch functions in