working but needs cleanup