added diff to tester

extracted getViewWidth util