Changed for more compatablility with Arduino mega