Separate pasring code from the constructor.