removed large block of old code