more readable and some TODO