cocoa: maybe this is cleaner...