added more tests
implemented thumbnailing