use inject instead of to_h in readings_hash function to make ruby 2.0.0 compatible