added naive version of function to do "forward max ent"