Added selection box functionality