finished implementation 1, howevever there are bugs which will require more research