fixing ben's code