fixing bug 3