add scratches. some bug fixes