Add apply functionality