bug fixing and adding status LED