cleaned up farm creation code