updating pressed state