finish code working