updated to compile with arduino IDE