finish the core functionality