my class project in Swift