fixing bug adding test