added take picture method