completed code and file