updated code

removed Cocoa from the beginning of the shared methods