Added swift mode support