added bound checks & simplified box creation
improved dash timing