added derivings and tests
cut for 0.0.2