Needs tweaking, but more functinoal