solving modal exercises