refactored to use rails helpers for links and images