add optional title function setter
add title func test
formatting with gofmt