finished key handling abstraction
added title attribute to selected flag