relocation php function finally working