modified a little bit not to use mouse