Updated main code

4 fields work properly, have to add others