working sensor selector

added function for graphs