added features to arduino sketch