this seems wrong and this entire fn isnt needed i dont think