added checkbox functionality