edited key functions - added up&down