[WIP] almost finished.