make native php calls and various changes