added methods for bg.max

Also found encoding bug in smoother.Rd