added functionality to both sides