double instead of boolean for "up" variable