more code almost done with beta