removed ajax, added first functions