Add eval function to simplify the multiple .apply calls