Finally somewhat working