minor enhancements, still buggy