fixed more code than expected