basic working code for simple camera app