added new logic to remote chef api module