issue url code and bunch of if statements