Modified it for unity