modified a couple of methods to work on mobile