cleaned up cruft code