implemented proof of work
fixed all build errors