added javascript to dynamically load status from the api