take out unneeded code, check for minScale and maxScale