fixed inputArray(), functions return HIGH/LOW instead of true/false, added writeOut()