added function to distribute tabs evenly (from Google I/O's app)