added automatic pinMode in constructor