refinement after testing on ec2/docker