added gas functionality