Working version on ec2, but ugly