finish apple mini-project. could use refactoring