add redirect method
add tests
fix cs