Fixed wrong values and added date index
Fixed wrong condition
Added helper for create class