improve frontpage code example