rewriten some functions, added new sensor types