returned the old code and trying to make it work