test
stupid fix
safety
calc struct: some debug params
some restructure and debugging