added getpicturesbytag and improved the tests