constructors and comparisons

untested, kinda hastily written