Define common operations as functions