use snprintf, remove unused denames