updated to use rails helpers