adding code and frame