update

added defined constants
changed base uri to dynamic