added led functionallity (thread functions)