add preview functions