finished base functionality