working but unfinished implimentation