still wierd timing problems but the correct values are being returned now