addressed #18 and #19, selection not working as in version 3