increased the clock speed, changed serial to finish faster, removed some redundant code
final version, everything works