enhancements and bug fixing