reliable fixed up
add back onmessage for now until we switch over to eventing
fix #10
edge case where end comes first
build