adding more involved functions