added calculate_results function, added multiple packages definitions