not type-checking yet, but some progress applied