code and function in place

code and function in place