Added flask endpoint