code enhancements and updates to functionality