fixed bugs in UF and wrote planet.h