detect and return based on user agent

fixes #4