-- some changes for compatibillity with NodeJs server