moving logic around

yes thats very bad