mostly coded, few errors