added code from phone-cat app