added some tests - needs lots of improvement