fixing issue 1 & 2