refactoring; added mouse object