Stable version. Working on TODO functions