updated ajax() and chanded it´s api