working version with ino file