fixed issue 2 & 4