added select all behaviour and comments