removed both methods from swap and made some corrections