add scripts, fix dividing by blocks