moved code into viewcontroller, added picker