solved final errors and test fialures