a simple tips calculator in Swift