updated to allow more fields