helpers for common cocoa tasks