improved boxhandling