merge multi-line and last fonseca code