some changes from php