changed task return type to two arraylists