improvements and core functions