use Resource object instead of tuple
added more tests and data