working on getting swift up, rearranged code for cleaner apperance