A context-aware system for ambient assisted living