Added pencil implementation