added event logic. removed sidebar widening functionality