Improved functions