bug fixed, homework is done