changed type of pressed and released to vector