added in changes for reacting to viewport size.