gemifying structure, adding unit tests