How can I protect my functions? (UPDATED)