finally working endtoend test