converted to php
merger