improved the historical events algo a little bit on the api
improved the historical events algo a little bit on the api

ProjectCloudly/cloudly,ProjectCloudly/cloudly,jparicka/cloudly,jparicka/cloudly,jparicka/cloudly,jparicka/cloudly,ProjectCloudly/cloudly,ProjectCloudly/cloudly,jparicka/cloudly,ProjectCloudly/cloudly