fix alocation + add missing stuff and move