this is using a gem, it is cheating, but it works