finished core functionality