update example and main file