modifed for mini2440