Added resource gathering functionality