remove debug and make things negative where appropriate