moved swift helper to the view controller