fixing bug 1