clean up and ducktyping