initialize listeners and keys