updated arduino library to contain separate code