finished prepare function, did not do extending testing yet