added edge insets and handling select row