working on village class, fixed a bug