Actually functional

temp array at the beginning idk change whatebr