works in cloud and locally