better allocation example