Useful little objective-c code