performance improvements abstracted