fxing #1 and fixing #4