formated old code