adding code_with_name helper method