Added getFields functionality