finished assignment functionality