updated code to used anax