helper and php functions added