before adding cam func