scan code and get params