rewrote middleware from scratch
updated package version to 1.0.0