lots of reverting and questions in swap method'