added getbounds, improved handling a bit