add end-to-end test