renamed and cleaned up