updated, hopefully won't freeze